﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="HouseList.aspx.cs" Inherits="HouseList" %>

<%@ Register Src="~/App_Widget/Navbar.ascx" TagName="navbar" TagPrefix="UITag" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <UITag:navbar runat="server" ID="navbar" />
    <form runat="server">
        <div class="container">
            <div class="page-header">
                <h1>房屋信息管理 <small>房屋信息查看</small></h1>
            </div>
            <div id="house-info">
                <table class="table">
                    <tr>
                        <th>
                            <a href="AddHouse.aspx" class="btn btn-default btn-sm ">添加</a>
                            <asp:Button runat="server" CssClass="btn btn-default btn-sm" OnClick="Publish" Text="发布" />
                            <asp:Button runat="server" CssClass="btn btn-default btn-sm" OnClick="Cancel" Text="撤销" />
                            <asp:Button runat="server" CssClass="btn btn-danger btn-sm" OnClick="Delete" Text="删除" />
                            <asp:Button runat="server" CssClass="btn btn-success btn-sm" OnClick="Rented" Text="确认租出" />
                        </th>
                        <th>查看：
                                <asp:DropDownList ID="ddlStatusFilter" runat="server" AutoPostBack="True" OnSelectedIndexChanged="StatusFilter" OnTextChanged="StatusFilter">
                                    <asp:ListItem>全部</asp:ListItem>
                                    <asp:ListItem>未发布</asp:ListItem>
                                    <asp:ListItem>已发布</asp:ListItem>
                                    <asp:ListItem>已撤销</asp:ListItem>
                                    <asp:ListItem>已删除</asp:ListItem>
                                    <asp:ListItem>已租出</asp:ListItem>
                                </asp:DropDownList>
                        </th>
                    </tr>
                </table>
                <table class="table">
                    <thead>
                        <tr>
                            <th>
                                <asp:Button runat="server" CssClass="btn btn-default btn-sm" Text="全选" OnClick="CheckAll" />
                                <asp:Button runat="server" CssClass="btn btn-default btn-sm" Text="反选" OnClick="Inverse" />

                            </th>
                            <th>#</th>
                            <th>地址</th>
                            <th>房间数量</th>
                            <th>价格</th>
                            <th>发布时间</th>
                            <th>状态</th>
                        </tr>
                    </thead>
                    <asp:Repeater ID="rptHouseList" runat="server">
                        <HeaderTemplate>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tbody>
                                <tr>
                                    <td>
                                        <asp:CheckBox HouseId='<%#Eval("Id") %>' runat="server" />
                                    </td>
                                    <td><%#Eval("Id") %></td>
                                    <td><%#Eval("Address") %></td>
                                    <td><%#Eval("RoomNumber") %></td>
                                    <td><%#Eval("Price") %></td>
                                    <td><%#Eval("PublishTime") %></td>
                                    <td><%#(Model.StatusCodeName)Eval("StatusCodeId") %></td>
                                </tr>
                            </tbody>
                        </ItemTemplate>
                    </asp:Repeater>
                </table>
            </div>
        </div>
    </form>



</body>
</html>
